<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
		<script>
			var rigthpassword = "123456";
			var inputpassword = prompt("请您输入一个密码:");
			while(rigthpassword != inputpassword) {
				alert("密码输入错误请重新输入");
				var inputpassword = prompt("请您输入一个密码:");
			}
			alert("登录成功");
		</script>
	</body>

</html>